﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            //C#常量
            const double PI = 3.1415926;
            double r = 16;
            double area = PI * r * r;
            Console.WriteLine(area);
         
            //一个分支判断
            var a =10 > 6;
            if (a)
            {
                Console.WriteLine("条件正确的");
            }

            //二个分支判断
            if (a)
            {
                Console.WriteLine("对了");
            }
            else
            {
                Console.WriteLine("错了");
            }

            //多个分支判断
            int b = 6;
            if (b>10)
            {
                Console.WriteLine("大于10");
            }
            else if (b>8)
            {
                Console.WriteLine("大于8");
            }
            else if (b>6)
            {
                Console.WriteLine("大于6");
            }
            else
            {
                Console.WriteLine("等于6或小于6");
            }

            //驼峰命名法
            string userName = "小米";

            //帕斯卡命名法
            string UserName = "小明";

            //switch case语句
            int c = 50;
            switch (c/10)
            {
                case 10:
                    Console.WriteLine("优秀");
                    break;
                case 9:
                    Console.WriteLine("优秀");
                    break;
                case 8:
                    Console.WriteLine("良好");
                    break;
                case 7:
                    Console.WriteLine("良好");
                    break;
                case 6:
                    Console.WriteLine("及格");
                    break;
                default:
                    Console.WriteLine("不及格");
                    break;
            }
        }
    }
}
